package com.bifang.core.dao.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 系统用户核心表
 *
 * @author chenzh
 * @since 2020-12-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SYS_USER")
@ApiModel(value = "SysUser对象", description = "系统用户核心表")
public class DictSysUser extends Model<DictSysUser> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户id")
    @TableId(value = "USER_ID", type = IdType.INPUT)
    private String userId;

    @ApiModelProperty(value = "用户名 应用账号可以使用工号等唯一标识")
    @TableField("USER_NAME")
    private String userName;

    @ApiModelProperty(value = "密码")
    @TableField("USER_PASSWORD")
    private String userPassword;

    @ApiModelProperty(value = "电子邮箱（加密）")
    @TableField("EMAIL")
    private String email;

    @ApiModelProperty(value = "手机（加密）")
    @TableField("CELLPHONE")
    private String cellphone;

    @ApiModelProperty(value = "姓名")
    @TableField("FULL_NAME")
    private String fullName;

    @ApiModelProperty(value = "证件类型")
    @TableField("CARD_TYPE")
    private String cardType;

    @ApiModelProperty(value = "身份证（加密）")
    @TableField("IDCARD")
    private String idcard;

    @ApiModelProperty(value = "备注")
    @TableField("REMARKS")
    private String remarks;

    @ApiModelProperty(value = "有效状态 0 禁用 1启用")
    @TableField("`STATUS`")
    private String status;

    @ApiModelProperty(value = "用户类型")
    @TableField("USER_TYPE")
    private String userType;

    @ApiModelProperty(value = "用户主机mac地址")
    @TableField("USER_MACADDR")
    private String userMacaddr;

    @ApiModelProperty(value = "用户ip")
    @TableField("USER_IP")
    private String userIp;

    @ApiModelProperty(value = "排列顺序")
    @TableField("ORDER_NO")
    private Integer orderNo;

    @ApiModelProperty(value = "校验码")
    @TableField("HASHCODE")
    private String hashcode;

    @ApiModelProperty(value = "逻辑删除标志 0 正常 1 删除")
    @TableField(value = "DEL", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @ApiModelProperty(value = "单位账号所属单位id")
    @TableField("ORG_ID")
    private String orgId;

    @ApiModelProperty(value = "接入应用账号所属应用id")
    @TableField("CLIENT_ID")
    private String clientId;

    @ApiModelProperty(value = "是否实人认证：0 否 1 是")
    @TableField("REAL_FLAG")
    private String realFlag;

    @Override
    public Serializable pkVal() {
        return this.userId;
    }
}
